# modprobe aufs

export PATH=/opt/midware/docker/bin:$PATH

DOCKER_HOST=tcp://127.0.0.1:2377
DOCKER_CERT_PATH=/root/.docker
DOCKER_TLS_VERIFY=1

--- ??? 
export DOCKER_CLIENT_TIMEOUT=300  # 客户端超时(秒)
export COMPOSE_HTTP_TIMEOUT=300   # Docker Compose超时
---

# 运行和状态
ls /var/lib/docker
ls /var/run/docker
ls /run/containerd

# 导入镜像
../bin/docker load -i /opt/midware/centos7.8.tar

../bin/docker images
REPOSITORY   TAG       IMAGE ID       CREATED       SIZE
<none>       <none>    db0f979c4417   4 years ago   538MB


# 创建启动容器
../bin/docker run -it --name cs1 db0f979c4417


../bin/docker start ca1dfc756508

# 进入容器

../bin/docker ps

CONTAINER ID   IMAGE          COMMAND            CREATED          STATUS          PORTS            NAMES
fd0705c135ab   db0f979c4417   "/usr/sbin/init"   54 seconds ago   Up 19 seconds   22/tcp, 80/tcp   cs1


../bin/docker exec -it fd0705c135ab /bin/bash

# 启停容器
../bin/docker start fd0705c135ab
../bin/docker stop fd0705c135ab


# 端口映射

../bin/docker run -d -p 6379:6379 -p 3316:3316 --mount type=bind,source=/opt/data,target=/opt/data -it --name port_ref db0f979c4417


# 网络模式

../bin/docker run -d --network host -p 6379:6379 -p 3316:3316 --mount type=bind,source=/opt/data,target=/opt/data -it --name port_ref db0f979c4417

# 查看所有容器
../bin/docker ps -a
